﻿#ifndef MESSAGETABLEVIEW_H
#define MESSAGETABLEVIEW_H

#include "mytableview.h"
#include "messagestandarditemmodel.h"
#include "message.h"

class MessageTableView : public MyTableView
{
    Q_OBJECT
public:
    explicit MessageTableView(QWidget *parent = nullptr);

    void initHiddenState();

    void setListPushButton(MultiListPushButton *listPushButton);

    void setData(QList<Message*> messages);

    void insertMessage(Message &message);

    void insertMessage(QList<Message*> messages);

    void clear();

    void showData(
            UserRelation *queryRelation,
            int type);
signals:
    void updateTotalValue(double totalTicket, double totalMoney);

public slots:

private:
    MessageStandardItemModel model;

    QList<Message*> messages;
};

#endif // MESSAGETABLEVIEW_H
